home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / FAX_SSTV / VESTER_M / TV2TIF.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1995-12-18  |  3.6 KB  |  80 lines

  1. 10  CLEAR,32768:KEY OFF:CLS
  2. 20  GOTO 1020
  3. 30  KEY 10,"666"+CHR$(13):KEY 5,"888"+CHR$(13)
  4. 40  KEY 4,"SAVE"+CHR$(34)+"TV2TIF"
  5. 50  PRINT"                        TIF FILE CONVERSION":PRINT
  6. 60  PRINT"       This program converts a K3BC SSTV file in Scottie (.S1 and .S2),"
  7. 70  PRINT"   Martin (M1 and M2), AVT (.90 and .94), Wraase (.96), FAX480 (.FAX),"
  8. 80  PRINT"   Colorfax (.CFX), and Wefax (640x480 .SVG) file format to a 24 bit"
  9. 90  PRINT"   color TIF format. The image on the TIF format will not be centered"
  10. 100  PRINT"   but rather will abut the left margin so you can circle thru TIF and"
  11. 110  PRINT"   back through TIFCONV for converting from one mode to another. The "
  12. 120  PRINT"   TIF file will be in 640x480. The TIF format is by far the most common"
  13. 130  PRINT"   format for transferring (but not saving) high quality pix among pub-"
  14. 140  PRINT"   lishing and other programs. ALCHEMY can be used to convert to many"
  15. 150  PRINT"   other standard formats as desired."
  16. 160  PRINT:PRINT:PRINT:PRINT"         ----F5 to SYS CONFIG----F10 to DOS--- "
  17. 170  PRINT"  What Mode desired  (3)Scot 1 (4)Scot 2 (5)AVT-90 (6)AVT-94 (7)Martin 1"
  18. 180  INPUT"  (77) Martin 2 (8) Wraase 96 (9) FAX480 (96)ColorFAX (98)Wefax";I
  19. 190  IF I=888 THEN KEY 5,"LIST 1000-"+CHR$(13):KEY 10,"system"+CHR$(13):GOTO 570
  20. 200  IF I=666 THEN CLS:SYSTEM
  21. 210  KEY 10,"system"+CHR$(13)
  22. 220  IF I=3 THEN MO$=".s1":L=288:LL=878:LI=256:Z=249:GOTO 330
  23. 230  IF I=4 THEN MO$=".s2":L=184:LL=568:LI=256:Z=249:GOTO 330
  24. 240  IF I=5 THEN MO$=".90":L=256:LL=768:LI=240:Z=138:GOTO 330
  25. 250  IF I=6 THEN MO$=".94":L=320:LL=960:LI=200:Z=138:GOTO 330
  26. 260  IF I=8 THEN MO$=".96":L=236:LL=745:LI=256:Z=255:GOTO 330
  27. 270  IF I=7 THEN MO$=".m1":L=302:LL=915:LI=256:Z=249:GOTO 330
  28. 280  IF I=77 THEN MO$=".m2":L=152:LL=464:LI=256:Z=249:GOTO 330
  29. 290  IF I=9 THEN MO$=".fax":Z=249:LI=480:LL=546:GOTO 330
  30. 300  IF I=98 THEN MO$=".svg":Z=249:LI=480:LL=640:GOTO 330
  31. 310  IF I=96 THEN MO$=".cfx":L=536:LL=1638:LI=480:Z=249:GOTO 330
  32. 320  GOTO 170
  33. 330  DEF SEG=&H4F00
  34. 340  BLOAD "tv2tfr.asm",&H100
  35. 350  IF I=96 THEN GOTO 390
  36. 355  IF I=98 THEN POKE &H24D,238
  37. 360  FOR Y=&H5A0 TO &H15B0
  38. 370  POKE Y,0:NEXT Y
  39. 380  GOTO 410
  40. 390  FOR Y=&HAA0 TO &H2120
  41. 400  POKE Y,0:NEXT Y
  42. 410  LB=INT(L/256):LA=L-256*LB:POKE &H26D,LA:POKE &H26E,LB
  43. 420  LLB=INT(LL/256):LLA=LL-256*LLB:POKE &H192,LLA:POKE &H193,LLB:POKE &H247,LLA:POKE &H248,LLB
  44. 430  LIB=INT(LI/256):LIA=LI-256*LIB:POKE &H18B,LIA:POKE &H18C,LIB
  45. 435  SU=6*L-1:SU2=INT(SU/256):SU1=SU-256*SU2
  46. 440  IF I=7 THEN POKE &H266,1
  47. 450  IF I=77 THEN POKE &H266,1
  48. 465  IF I=98 OR I=9 THEN POKE &H1A8,154:POKE &H1A9,0:POKE &H1B9,128:POKE &H1BA,7:GOTO 480
  49. 470  POKE &H1B9,0:POKE &H1BA,15:POKE &H28B,SU1:POKE &H28C,SU2
  50. 475  IF I=96 THEN POKE &H26D,24:POKE &H26E,2:POKE &H28F,10:POKE &H284,3:POKE &H277,235:POKE &H278,9:POKE &H28B,71:POKE &H28C,6:POKE &H1B9,128:POKE &H1BA,7
  51. 480  PRINT:PRINT:PRINT:INPUT"   What Path/File name (Program adds suffix)";OF$
  52. 490  IF OF$="" THEN GOTO 480
  53. 494  IF CE=0 THEN GOTO 500
  54. 495  IF I=96 THEN PO=(L/2)-320:GOTO 510
  55. 496  IF I=9 OR I=98 THEN PO=(LL/2)-320:GOTO 510
  56. 497  PO=L-320:GOTO 510
  57. 500  PRINT:PRINT:PRINT:INPUT"   Pixel offset to center in TIF image (Default=0=Left Edge Align)";PO
  58. 510  OF=2048-3*PO+OS
  59. 511  IF I=7 OR I=77 THEN OF=OF+1
  60. 512  OF2=INT(OF/256):OF1=OF-256*OF2:POKE &H266,OF1:POKE &H267,OF2:POKE &H257,OF1:POKE &H258,OF2
  61. 520  PRINT:PRINT:PRINT:INPUT"   Output File Path/Name-program adds suffix(Default=d:a.tif)";PIX$
  62. 530  IF PIX$="" THEN PIX$=DR$+":a"
  63. 540  NF$=PIX$+".TIF"
  64. 550  TF$=OF$+MO$
  65. 560  K=&H100:CALL K(K%,L%,TF$,NF$)
  66. 565  PRINT:PRINT"          NEW FILE CREATED"
  67. 570  CLS:PRINT:PRINT"   F2 to RERUN     F5 to SYS CONFIG    F10 to DOS"
  68. 590  KEY 5,"LIST 1000-"+CHR$(13):KEY 10,"SYSTEM"+CHR$(13)
  69. 600  END
  70. 1000    '                   SYSTEM CONFIGURATION
  71. 1010    'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  72. 1020  DR$="d" 'RAMDISK drive designation--make letter D match your drive
  73. 1030  CE=0    'CE=0 Left Edge Aligned--CE=1 TV image centered in TIF image
  74. 1035  OS=0    'offset to get color order--OS=0 for photoshop
  75. 1040  GOTO 30
  76. 1060                           'INSTRUCTIONS
  77. 1070   'To change, move cursor and type over present value and ENTER. Then move
  78. 1080   'cursor into clear and hit F5 to check what you typed. To SAVE the change
  79. 1090   'hit F4 and ENTER. Otherwise hit F2 to reRUN with temporary change.
  80.